<?php
//
// +------------------------------------------------------------------------+
// | Gecko Framework                                                        |
// +------------------------------------------------------------------------+
//
require_once("Gecko/Form/Exception.php");
require_once("Gecko/Form/Field.php");
require_once("Gecko/Form/Field/Text.php");

/**
 * Number only field control
 *
 * @package Gecko.Form.Field;
 * @author Christopher Valderrama <valderrama.christopher@gmail.com>
 * @copyright Copyright (c) 2008
 * @version $Id$v1.0$ 2008
 * @access public
 **/
class Gecko_Form_Field_Number extends Gecko_Form_Field_Text {
	/**
	 * Control type
	 *
	 * @var string
	 */
	protected $type = "number";

	/**
	 * Constructor
	 *
	 * @param string $name
	 * @param string $value
	 * @param array $params
	 */
	public function __construct( $name, $value = "", $params = array() ) {
		parent::__construct( $name, $value, $params );

		$this->addValidator( new Gecko_Form_Validator_Digits() );
	}
}